﻿/*
set_options.sqf
*/

_arr_herbe = [];
_arr_herbe set [0, localize "STR_OPTIONS_HERBE_0"];
_arr_herbe set [1,localize "STR_OPTIONS_HERBE_1"];
_arr_herbe set [2,localize "STR_OPTIONS_HERBE_2"];


disableSerialization;
_display = uiNamespace getVariable "OPTIONS_DIALOG";

_control = _display displayCtrl 4684;
_index = lbCurSel _control;
_distance = 0;
if (_index >= 0 && PR_CAN_CHANGE_VIEWDIST > 0) then {
	_distance = ViewDistanceValues select _index;
	setViewDistance (_distance);
	CONFIG_Default_ViewDistance = _index;
};

_control = _display displayCtrl 4685;
_index = lbCurSel _control;
_txt_herbe = "";
if (_index >= 0 && PR_CAN_CHANGE_GRASS > 0) then {
	_txt_herbe =  _arr_herbe select _index;
	setTerrainGrid (VegetationLevel select _index);
	CONFIG_Default_Grass = _index;
};

closeDialog 0;

player sideChat format[localize "STR_OPTIONS_SET",_distance,_txt_herbe];